/**
 * Created by jihb on 4/26/16.
 */
Ext.define('JYnovel.store.novel.NovelCategoryTreeStore', {
    extend: 'Ext.data.TreeStore',
    requires: [
        'Ext.data.proxy.Ajax',
        'Ext.data.reader.Json'
    ],
    constructor: function(cfg) {
        var me = this;
        cfg = cfg || {};
        me.callParent([Ext.apply({
            model: 'JYnovel.model.novel.NovelCategoryModel',
            defaultRootId:'0',
            proxy: {
                type: 'ajax',
                reader: {
                    type: 'json'
                },
                url: ctx+'/novelcategory/tree'
            },
            nodeParam:'parentId'
        }, cfg)]);
    }
});